import request from '@/utils/request'

//获取品牌列表
export const getTradeList = (page, limit) => request({ url: `/product/baseTrademark/${page}/${limit}`, method: 'get' })

//添加或修改品牌
export function addOrUpdateTrade(tradeform) {
    if (!tradeform.id) {
        console.log(tradeform)
        return request({ url: `/product/baseTrademark/save`, method: 'post', data: tradeform })
    } else {
        return request({ url: `/product/baseTrademark/update`, method: 'put', data: tradeform })
    }
}

//获取选定id的品牌
export function getTrade(id) {
    return request({ url: `/product/baseTrademark/get/${id}`, method: 'get' })
}

//删除
export function delTrade(id) {
    return request({ url: `/product/baseTrademark/remove/${id}`, method: 'delete' })
}